package com.wt.config;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IDEA
 * Describe:
 * Author:TianJI
 * Date:2018/11/1
 * Time:18:59
 */
//批量扫描
@MapperScan("com.wt.mapper")
@Configuration
public class MybatisConfig {
    public ConfigurationCustomizer configurationCustomizer(){
        return new ConfigurationCustomizer(){

            @Override
            public void customize(org.apache.ibatis.session.Configuration configuration) {
                //开启驼峰映射规则
                configuration.setMapUnderscoreToCamelCase(true);
            }
        };
    }
}
